package org.vison.wonfu.framework.soa;

public interface SoaConstants {

    String CONSUMER_MODEL = "consumerModel";
    String PROVIDER_MODEL = "providerModel";
    String METHOD_MODEL = "methodModel";

    String INTERFACE = "interface";
    String INTERFACES = "interfaces";

    String CONSUMER_METHOD_CONFIG = "consumerMethodConfig";

    String CIRCLE_BREAKER_SLIDING_WINDOW_SIZE = "wonfu.soa.circuit-breaker.slidingWindowSize.";
    String CIRCLE_BREAKER_MANUAL_BREAKER = "wonfu.soa.circuit-breaker.manualBreaker.";
    String CIRCLE_BREAKER_ENABLE = "wonfu.soa.circuit-breaker.enable.";
    String CIRCLE_BREAKER_HALF_OPEN_INTERVAL = "wonfu.soa.circuit-breaker.halfOpenInterval.";
    String CIRCLE_BREAKER_SUCCESS_THRESHOLD = "wonfu.soa.circuit-breaker.successThreshold.";
    String CIRCLE_BREAKER_REQUEST_THRESHOLD = "wonfu.soa.circuit-breaker.requestThreshold.";
    String CIRCLE_BREAKER_ERROR_RATE_THRESHOLD = "wonfu.soa.circuit-breaker.errorRateThreshold.";

    // 熔断器默认值常量
    boolean DEFAULT_CIRCLE_BREAKER_MANUAL_BREAKER = false;
    boolean DEFAULT_CIRCLE_BREAKER_ENABLE = false;
    int DEFAULT_CIRCLE_BREAKER_SLIDING_WINDOW_SIZE = 10;
    int DEFAULT_CIRCLE_BREAKER_HALF_OPEN_INTERVAL = 5;
    int DEFAULT_CIRCLE_BREAKER_SUCCESS_THRESHOLD = 3;
    int DEFAULT_CIRCLE_BREAKER_REQUEST_THRESHOLD = 100;
    double DEFAULT_CIRCLE_BREAKER_ERROR_RATE_THRESHOLD = 0.5;
    String SOA_SERVICE_SCANNER = "wonfu.soa.provider.package";
    String GOVERNANCE_REPORT_ENABLED = "wonfu.soa.governance.report.enabled";
    String RPC_CONTEXT_PREFIX = "x-wf-";
    String RPC_CONTEXT_BASE_PREFIX = RPC_CONTEXT_PREFIX + "base-";
    String UP_STREAM_APP_ID = RPC_CONTEXT_BASE_PREFIX + "upstream-appid";

}